package com.ztgf.order.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.order.models.bo.OrderShopStatisticsBO;
import com.ztgf.order.models.vo.OrderCommodityStatisticsShopVO;
import com.ztgf.order.models.vo.OrderCommodityStatisticsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * author: chenyu.wang
 * date: 2020-07-24 15:15
 * Description: 后台管理系统产品统计映射
 */
@Mapper
public interface OrderCommodityStatisticsMapper {

    /**
     * description: 当前平台商品总量
     * param: []
     * author: chenyu.wang
     * date: 2020-07-24
     * return: java.lang.Integer
     */
    Integer queryCommodityTotal();

    /*
     * @description:查询所有最终级类目
     * @author: chenyu.wang
     * @date: 2020-08-10
     * @param:
     * @return:
     */
    List<OrderCommodityStatisticsVO> queryAllFianlCategory(Page<OrderCommodityStatisticsVO> page);

    /*
     * @description:类目下商品数量
     * @author: chenyu.wang
     * @date: 2020-08-10
     * @param:
     * @return:
     */
    Integer getCategoryGoodsNum(@Param("categoryId") Long categoryId);

    /*
     * @description:查询店铺类目
     * @author: chenyu.wang
     * @date: 2020-08-10
     * @param:
     * @return:
     */
    List<OrderCommodityStatisticsShopVO> queryShopCategory(Page<OrderCommodityStatisticsShopVO> page, @Param("item") OrderShopStatisticsBO bo);

    /*
     * @description:店铺类目商品数量
     * @author: chenyu.wang
     * @date: 2020-08-10
     * @param:
     * @return:
     */
    Integer getGoodsNumByShop(@Param("categoryId") Long categoryId, @Param("shopId") Long shopId);

    /**
     * @return : java.util.List<com.ztgf.order.models.vo.OrderCommodityStatisticsShopVO>
     * @Author :chenyu.wang
     * @Description : 各类目店铺商品统计
     * @Date : 2021.03.02 15:36
     * @Param : [page, bo]
     **/
    List<OrderCommodityStatisticsShopVO> queryCategoryShopGoodsCount(Page<OrderCommodityStatisticsShopVO> page, @Param("item") OrderShopStatisticsBO bo);
}
